import React from "react";
import Title from "./Title";
class Container extends React.Component
{
    constructor()
    {
        super();
        this.state = {
            message:"我是消息"
        }
    }

    handleClick()
    {
        this.setState({
            message:"我不是消息"
        })
    }
    
    render()
    {
        return (<div>
            <Title title={"我是标题组件"} handleClick={()=>{this.handleClick()}}></Title>
            <div>{ this.state.message}</div>
        </div>)
    }

}

export default Container;